\section{NFcore::GlobalFunction Class Reference}
\label{classNFcore_1_1GlobalFunction}\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}}
{\tt \#include $<$NFfunction.hh$>$}



\subsection{Detailed Description}
Defines functions to be used globally in a simulation. 

This small class is a small wrapper for the \doxyref{mu}{p.}{namespacemu} parser that allows the \doxyref{System}{p.}{classNFcore_1_1System} to keep track of functions that will be used throughout the course of the simulation. These functions are only evaluated as needed to either output the value or when recomputing the rate of some reaction. \subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf GlobalFunction} (string {\bf name}, string {\bf funcString}, vector$<$ string $>$ \&{\bf argNames}, vector$<$ string $>$ \&{\bf argTypes}, vector$<$ string $>$ \&paramConstNames, vector$<$ double $>$ \&paramConstValues)
\item 
{\bf $\sim$GlobalFunction} ()
\item 
void {\bf prepareForSimulation} ({\bf System} $\ast$s)
\item 
string {\bf getNiceName} () const 
\item 
string {\bf getName} () const 
\item 
void {\bf printDetails} ()
\item 
void {\bf attatchRxn} ({\bf ReactionClass} $\ast$r)
\item 
int {\bf getNumberOfArgs} () const 
\item 
string {\bf getArgName} (int argIndex) const 
\item 
string {\bf getArgType} (int argIndex) const 
\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
mu::Parser $\ast$ {\bf p}
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
string {\bf name}
\item 
string {\bf funcString}
\item 
unsigned int {\bf n\_\-args}
\item 
string $\ast$ {\bf argNames}
\item 
string $\ast$ {\bf argTypes}
\item 
unsigned int {\bf n\_\-paramConst}
\item 
string $\ast$ {\bf paramNames}
\item 
double $\ast$ {\bf paramValues}
\end{CompactItemize}


\subsection{Constructor \& Destructor Documentation}
\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!GlobalFunction@{GlobalFunction}}
\index{GlobalFunction@{GlobalFunction}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GlobalFunction::GlobalFunction (string {\em name}, string {\em funcString}, vector$<$ string $>$ \& {\em argNames}, vector$<$ string $>$ \& {\em argTypes}, vector$<$ string $>$ \& {\em paramConstNames}, vector$<$ double $>$ \& {\em paramConstValues})}\label{classNFcore_1_1GlobalFunction_f7d05121200159e0c08195d5ee70c522}


Creates a \doxyref{GlobalFunction}{p.}{classNFcore_1_1GlobalFunction} with the given variables (which should be \doxyref{Observable}{p.}{classNFcore_1_1Observable} objects that the \doxyref{System}{p.}{classNFcore_1_1System} has) as well as a set of parameter values. Note that creating a \doxyref{GlobalFunction}{p.}{classNFcore_1_1GlobalFunction} does not initialize its parser. The initialize, you have to call the \doxyref{prepareForSimulation()}{p.}{classNFcore_1_1GlobalFunction_31e9557210e6fdc3e5c87edc00a40be4} function which is currently handled by the \doxyref{System}{p.}{classNFcore_1_1System}. \index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!$\sim$GlobalFunction@{$\sim$GlobalFunction}}
\index{$\sim$GlobalFunction@{$\sim$GlobalFunction}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GlobalFunction::$\sim$GlobalFunction ()}\label{classNFcore_1_1GlobalFunction_156e1b570424dde89dbe32c0217ed449}


Deletes the \doxyref{GlobalFunction}{p.}{classNFcore_1_1GlobalFunction} along with all of its associated variable and constant parameter information. 

\subsection{Member Function Documentation}
\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!prepareForSimulation@{prepareForSimulation}}
\index{prepareForSimulation@{prepareForSimulation}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GlobalFunction::prepareForSimulation ({\bf System} $\ast$ {\em s})}\label{classNFcore_1_1GlobalFunction_31e9557210e6fdc3e5c87edc00a40be4}


This actually initializes the Function Parser so that it can be used. \index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!getNiceName@{getNiceName}}
\index{getNiceName@{getNiceName}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string NFcore::GlobalFunction::getNiceName () const\hspace{0.3cm}{\tt  [inline]}}\label{classNFcore_1_1GlobalFunction_1f8462a4c988a039aa5db1bea0eab698}


Simply gives the name of the function nicely (meaning something like func1()) for debugging / outputing. \index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!getName@{getName}}
\index{getName@{getName}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string NFcore::GlobalFunction::getName () const\hspace{0.3cm}{\tt  [inline]}}\label{classNFcore_1_1GlobalFunction_5b4b99a92729f87d69dca911a930c6eb}


Simply gives the name of the function only (without the open and close parentheses) . \index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!printDetails@{printDetails}}
\index{printDetails@{printDetails}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GlobalFunction::printDetails ()}\label{classNFcore_1_1GlobalFunction_5a352818f7bceb358f34f5c6c9b5b793}


For Debugging, prints out the details of the function including the defined variables and constant parameters as well as what the function currently evaluates to. \index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!attatchRxn@{attatchRxn}}
\index{attatchRxn@{attatchRxn}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GlobalFunction::attatchRxn ({\bf ReactionClass} $\ast$ {\em r})}\label{classNFcore_1_1GlobalFunction_434556d0375f13a99ab532dbc206ab29}


When a reaction uses this function, we have to keep track of it here so that we can notify it to update is propensity when this function changes... \index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!getNumberOfArgs@{getNumberOfArgs}}
\index{getNumberOfArgs@{getNumberOfArgs}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int NFcore::GlobalFunction::getNumberOfArgs () const\hspace{0.3cm}{\tt  [inline]}}\label{classNFcore_1_1GlobalFunction_190a13c5cd78559e44b2a75f313a8a5e}


\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!getArgName@{getArgName}}
\index{getArgName@{getArgName}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string NFcore::GlobalFunction::getArgName (int {\em argIndex}) const\hspace{0.3cm}{\tt  [inline]}}\label{classNFcore_1_1GlobalFunction_d826578e762375b707dd7fff191f6eb5}


\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!getArgType@{getArgType}}
\index{getArgType@{getArgType}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string NFcore::GlobalFunction::getArgType (int {\em argIndex}) const\hspace{0.3cm}{\tt  [inline]}}\label{classNFcore_1_1GlobalFunction_694d33168a8958adc0dea20ea714ed37}




\subsection{Member Data Documentation}
\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!p@{p}}
\index{p@{p}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}mu::Parser$\ast$ {\bf NFcore::GlobalFunction::p}}\label{classNFcore_1_1GlobalFunction_e7d1724b1ba1c604e2f35e9a2970f9a1}


This is the actual Parser object that keeps track of the function and has references to all of its arguments. It is publicly visible, so be careful with it! Use this variable to evaluate the function. See the \doxyref{mu}{p.}{namespacemu} parser documentation and the \doxyref{FuncFactory}{p.}{classNFcore_1_1FuncFactory} class for details on how to use this. \index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!name@{name}}
\index{name@{name}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string {\bf NFcore::GlobalFunction::name}\hspace{0.3cm}{\tt  [protected]}}\label{classNFcore_1_1GlobalFunction_f6c9cd92eb143d8ce24b275a26a4ff52}


\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!funcString@{funcString}}
\index{funcString@{funcString}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string {\bf NFcore::GlobalFunction::funcString}\hspace{0.3cm}{\tt  [protected]}}\label{classNFcore_1_1GlobalFunction_e480f9fa5b5f4513e9a825e83dc940c9}


\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!n\_\-args@{n\_\-args}}
\index{n\_\-args@{n\_\-args}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf NFcore::GlobalFunction::n\_\-args}\hspace{0.3cm}{\tt  [protected]}}\label{classNFcore_1_1GlobalFunction_9ddea1b9a9e957c3470f7961c20e69c4}


\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!argNames@{argNames}}
\index{argNames@{argNames}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string$\ast$ {\bf NFcore::GlobalFunction::argNames}\hspace{0.3cm}{\tt  [protected]}}\label{classNFcore_1_1GlobalFunction_0fd26dfad0ef4770839d4cc3641862bc}


\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!argTypes@{argTypes}}
\index{argTypes@{argTypes}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string$\ast$ {\bf NFcore::GlobalFunction::argTypes}\hspace{0.3cm}{\tt  [protected]}}\label{classNFcore_1_1GlobalFunction_cfa2b51eb0b00ec320e07ff23bd5cddd}


\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!n\_\-paramConst@{n\_\-paramConst}}
\index{n\_\-paramConst@{n\_\-paramConst}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf NFcore::GlobalFunction::n\_\-paramConst}\hspace{0.3cm}{\tt  [protected]}}\label{classNFcore_1_1GlobalFunction_d374210626c90d565237d86dd61872b3}


\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!paramNames@{paramNames}}
\index{paramNames@{paramNames}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}string$\ast$ {\bf NFcore::GlobalFunction::paramNames}\hspace{0.3cm}{\tt  [protected]}}\label{classNFcore_1_1GlobalFunction_2f3c212d8164a5212ad3a9cdc67e0cce}


\index{NFcore::GlobalFunction@{NFcore::GlobalFunction}!paramValues@{paramValues}}
\index{paramValues@{paramValues}!NFcore::GlobalFunction@{NFcore::GlobalFunction}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double$\ast$ {\bf NFcore::GlobalFunction::paramValues}\hspace{0.3cm}{\tt  [protected]}}\label{classNFcore_1_1GlobalFunction_d3b6691ddd6e8e4982a9ee05a0f2d4cd}




The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
/home/msneddon/eclipse/ganymede\_\-cpp/workspace/NFsim\_\-svn/src/NFfunction/{\bf NFfunction.hh}\item 
/home/msneddon/eclipse/ganymede\_\-cpp/workspace/NFsim\_\-svn/src/NFfunction/{\bf function.cpp}\end{CompactItemize}
